package com.hyq.abstractfactory.universal;
/**
* @ClassName: Client 
* @Description: 模拟演示客户端
* @author Janus
 */
public class Client {

	public static void main(String[] args) {
		//产品标志为One的产品
		AbstractCreator createA = new Creator_One();
		//产品标示为Two的产品
		AbstractCreator createB = new Creator_Two();
		//产品A-One
		AbstractProductA productA_one = createA.createProductA();
		productA_one.shareMethod();
		productA_one.doSomething();
		//产品B-Two
		AbstractProductA productA_two = createB.createProductA();
		productA_two.shareMethod();
		productA_two.doSomething();
		System.out.println("-----------分割线---------");
		//产品B-One
		AbstractProductB productB_one=createA.createProductB();
		productB_one.shareMethod();
		productB_one.doSomething();
		//产品B-Two
		AbstractProductB productB_two = createB.createProductB();
		productB_two.shareMethod();
		productB_two.doSomething();
	}

}
